<?php


class DB_USER_LOG extends ORM_Table {
    static protected $table_name = 'user_log';
    
    static public function getTableName($params = null) {
        //$table_name = self::$table_name.substr($params['article_type_id'], 0, 1);
        return self::$table_name;
    }

    /**
     * 记录日志
     * @param <type> $uid
     * @param <type> $ip
     */
    static public function writeLog($uid,$ip) {
        $log    = new DB_USER_LOG();
        $log->setUid($uid);
        $log->setIp($ip);
        $log->setCreated(time());
        $log->save();
    }
}

